Introduction To Optimization Theory And Applications In Machine Learning